<template>
  <div>
    <index-swiper></index-swiper>
    <index-ads :sildeList="sildeList"></index-ads>
    <all-goods></all-goods>
    <nav-service></nav-service>
  </div>
</template>

<script>
import NavService from "components/navfooter/NavService";
import IndexSwiper from "./IndexSwiper";
import IndexAds from "./indexAds";
import AllGoods from "./allGoods";
export default {
  name: "index",
  components: {
    NavService,
    IndexSwiper,
    IndexAds,
    AllGoods,
  },
  data () {
    return {
      sildeList: [],
      pageQuery: {
        pageNum: 1,
        pageSize: 4
      },
    }
  },
  mounted() {
    // this.getNavBanner();
  },
  methods: {
    /**
     * 获取顶部banner列表
     */
    getNavBanner () {
      this.$api.shop.getBannerList(this.pageQuery).then(res => {
        if (res.code === 200) {
          this.sildeList = res.data.records
        }
      })
    }
  },
};
</script>
<style scoped>
</style>
